/**
 * Copyright 2016-2016 the original author or authors.
 * Created on 2016/12/8 下午7:55
 */
package com.mechanic.api;

import com.mechanic.model.HelloDocker;
import com.mechanic.service.HelloDockerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 请在此写下该类的说明
 *
 * @author Mechanic
 * @version 请在此写下该类的版本号
 */
@RestController
@RequestMapping("/")
public class HelloDockerContorller {

    private HelloDockerService helloDockerService;

    @Autowired
    public HelloDockerContorller(HelloDockerService helloDockerService) {
        this.helloDockerService = helloDockerService;
    }

    @RequestMapping(method=RequestMethod.GET, produces="application/json")
    public List<HelloDocker> helloDocker( ){
        return helloDockerService.getHelloDockers();
    }
}



